package com.javasm.mingming.chat.controller;

import com.javasm.mingming.chat.service.ChatService;
import com.javasm.mingming.common.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author javasm
 * @version 0.1
 * @className ChatController
 * @descriptioin:
 * @date 2025/1/20 15:50
 * @since jdk11
 */
@RestController
@RequestMapping("/chat")
public class ChatController {

    @Resource
    ChatService chatService;

    //发送消息
    @PostMapping("/send/room/message")
    public R sendMessage(String roomId,String uid,String message){
        chatService.messageSend(roomId,uid,message);
        return R.ok();
    }
}
